let res = '?id=1&name="Jack"&age=18'

urlString.prototype.query{
    if(res.indexOf('?') !== -1){
        res = res.slice(1)
    }
    res = res.split('&')
    res.forEach(item=>{
        let arr = item.split('=')
        let obj={}
        obj[arr[0]]=arr[1]
    })
} 

console.log(urlString.query())